<?php
namespace app\admin\controller\product;

use app\Request;
use app\admin\controller\AuthController;
use learn\services\UtilService as Util;


//引入模型 
use app\admin\model\product\LoanCollection;
use app\admin\model\product\LoanBrowse;
use app\admin\model\product\LoanRecord;

class ProductRecord extends AuthController
{

    protected $noNeedLogin = ['index'];

    /**
     * 收藏记录
     */
    public function collection_index ()
    {
        return $this->fetch();
    }

    /**
     * 获取列表
     */
    public function lst ()
    {
        $where = Util::postMore([
            ['phone',""],
            ['page',1],
            ['limit',20],
        ]);
        return app("json")->layui(LoanCollection::systemList($where));
    }

    /**
     * 申请记录
     */

    public  function apply_index ()
    {
        return $this->fetch();
    }

    /**
     * 获取列表
     */
    public function apply_lst ()
    {
        $where = Util::postMore([
            ['phone',""],
            ['page',1],
            ['limit',20],
        ]);
        return app("json")->layui(LoanRecord::systemList($where));
    }

    /**
     * 浏览记录
     */
    public function browse_index ()
    {
        return $this->fetch();
    }

    /**
     * 获取列表
     */
    public function browse_list ()
    {
        $where = Util::postMore([
            ['phone',""],
            ['page',1],
            ['limit',20],
        ]);
        return app("json")->layui(LoanBrowse::systemList($where));
    }
}
